import request from '@/config/axios'

// 师昌绪初评-专业分组评委 VO
export interface ScxInitialMajorJudgeVO {
  id?: string // 评委账号ID
  awardId: string // 评奖ID
  majorId: string // 专业分组ID
  mentorId: number // 导师ID,系统账号表system_users中 ID
}

// 管理后台 - 师昌绪初评-专业分组评委已选列表 Response VO
export interface ScxInitialMajorJudgeSelectedRespVO {
  id: string // 主键
  awardId: string // 评奖ID
  majorId: string // 专业分组ID
  mentorId: number // 导师ID,系统账号表system_users中 ID
  nickname: string // 教师姓名
  jobCode: string // 工号
  mobile: string // 手机号码
  deptName: string // 部门名称
  zcm: string // 职称码
  workingStatus: string // 工作状态
}

// 师昌绪初评-专业分组评委 API
export const ScxInitialMajorJudgeApi = {
  // 查询师昌绪初评-专业分组评委分页
  getScxInitialMajorJudgePage: async (params: any) => {
    return await request.get({ url: `/awards/scx-initial-major-judge/page`, params })
  },

  // 查询师昌绪初评-专业分组评委详情
  getScxInitialMajorJudge: async (id: number) => {
    return await request.get({ url: `/awards/scx-initial-major-judge/get?id=` + id })
  },

  // 新增师昌绪初评-专业分组评委
  createScxInitialMajorJudge: async (data: ScxInitialMajorJudgeVO) => {
    return await request.post({ url: `/awards/scx-initial-major-judge/create`, data })
  },

  // 修改师昌绪初评-专业分组评委
  updateScxInitialMajorJudge: async (data: ScxInitialMajorJudgeVO) => {
    return await request.put({ url: `/awards/scx-initial-major-judge/update`, data })
  },

  // 删除师昌绪初评-专业分组评委
  deleteScxInitialMajorJudge: async (id: number) => {
    return await request.delete({ url: `/awards/scx-initial-major-judge/delete?id=` + id })
  },

  // 导出师昌绪初评-专业分组评委 Excel
  exportScxInitialMajorJudge: async (params) => {
    return await request.download({ url: `/awards/scx-initial-major-judge/export-excel`, params })
  },

  // 批量创建师昌绪初评-专业分组评委
  createScxInitialMajorJudgeBatch: async (majorId: string, data: ScxInitialMajorJudgeVO[]) => {
    return await request.post({
      url: `/awards/scx-initial-major-judge/create-batch/${majorId}`,
      data
    })
  },

  // 批量删除师昌绪初评-专业分组评委
  deleteScxInitialMajorJudgeBatch: async (
    majorId: string,
    data: Partial<ScxInitialMajorJudgeVO>[]
  ) => {
    return await request.delete({
      url: `/awards/scx-initial-major-judge/delete-batch/${majorId}`,
      data
    })
  },

  // 查询指定评奖中 非majorId的评委
  getConflictMajorJudge: async (awardsId: string, majorId: string) => {
    return await request.get({
      url: `/awards/scx-initial-major-judge/conflict-judge?awardsId=${awardsId}&majorId=${majorId}`
    })
  }
}
